Optimal. Leaf size=86 \[ -\frac {2 (b B-A c) \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {d+e x}}{\sqrt {c d-b e}}\right )}{b \sqrt {c} \sqrt {c d-b e}}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {d+e x}}{\sqrt {d}}\right )}{b \sqrt {d}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {826, 1166, 208} \[ -\frac {2 (b B-A c) \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {d+e x}}{\sqrt {c d-b e}}\right )}{b \sqrt {c} \sqrt {c d-b e}}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {d+e x}}{\sqrt {d}}\right )}{b \sqrt {d}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 826
Rule 1166
Rubi steps
\begin {align*} \int \frac {A+B x}{\sqrt {d+e x} \left (b x+c x^2\right )} \, dx &=2 \operatorname {Subst}\left (\int \frac {-B d+A e+B x^2}{c d^2-b d e+(-2 c d+b e) x^2+c x^4} \, dx,x,\sqrt {d+e x}\right )\\ &=\frac {(2 A c) \operatorname {Subst}\left (\int \frac {1}{-\frac {b e}{2}+\frac {1}{2} (-2 c d+b e)+c x^2} \, dx,x,\sqrt {d+e x}\right )}{b}+\left (2 \left (\frac {B}{2}-\frac {2 c (-B d+A e)-B (-2 c d+b e)}{2 b e}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{\frac {b e}{2}+\frac {1}{2} (-2 c d+b e)+c x^2} \, dx,x,\sqrt {d+e x}\right )\\ &=-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {d+e x}}{\sqrt {d}}\right )}{b \sqrt {d}}-\frac {2 (b B-A c) \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {d+e x}}{\sqrt {c d-b e}}\right )}{b \sqrt {c} \sqrt {c d-b e}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 84, normalized size = 0.98 \[ \frac {2 \left (\frac {(A c-b B) \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {d+e x}}{\sqrt {c d-b e}}\right )}{\sqrt {c} \sqrt {c d-b e}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {d+e x}}{\sqrt {d}}\right )}{\sqrt {d}}\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 489, normalized size = 5.69 \[ \left [-\frac {\sqrt {c^{2} d - b c e} {\left (B b - A c\right )} d \log \left (\frac {c e x + 2 \, c d - b e + 2 \, \sqrt {c^{2} d - b c e} \sqrt {e x + d}}{c x + b}\right ) - {\left (A c^{2} d - A b c e\right )} \sqrt {d} \log \left (\frac {e x - 2 \, \sqrt {e x + d} \sqrt {d} + 2 \, d}{x}\right )}{b c^{2} d^{2} - b^{2} c d e}, \frac {2 \, \sqrt {-c^{2} d + b c e} {\left (B b - A c\right )} d \arctan \left (\frac {\sqrt {-c^{2} d + b c e} \sqrt {e x + d}}{c e x + c d}\right ) + {\left (A c^{2} d - A b c e\right )} \sqrt {d} \log \left (\frac {e x - 2 \, \sqrt {e x + d} \sqrt {d} + 2 \, d}{x}\right )}{b c^{2} d^{2} - b^{2} c d e}, -\frac {\sqrt {c^{2} d - b c e} {\left (B b - A c\right )} d \log \left (\frac {c e x + 2 \, c d - b e + 2 \, \sqrt {c^{2} d - b c e} \sqrt {e x + d}}{c x + b}\right ) - 2 \, {\left (A c^{2} d - A b c e\right )} \sqrt {-d} \arctan \left (\frac {\sqrt {e x + d} \sqrt {-d}}{d}\right )}{b c^{2} d^{2} - b^{2} c d e}, \frac {2 \, {\left (\sqrt {-c^{2} d + b c e} {\left (B b - A c\right )} d \arctan \left (\frac {\sqrt {-c^{2} d + b c e} \sqrt {e x + d}}{c e x + c d}\right ) + {\left (A c^{2} d - A b c e\right )} \sqrt {-d} \arctan \left (\frac {\sqrt {e x + d} \sqrt {-d}}{d}\right )\right )}}{b c^{2} d^{2} - b^{2} c d e}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 79, normalized size = 0.92 \[ \frac {2 \, {\left (B b - A c\right )} \arctan \left (\frac {\sqrt {x e + d} c}{\sqrt {-c^{2} d + b c e}}\right )}{\sqrt {-c^{2} d + b c e} b} + \frac {2 \, A \arctan \left (\frac {\sqrt {x e + d}}{\sqrt {-d}}\right )}{b \sqrt {-d}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 101, normalized size = 1.17 \[ -\frac {2 A c \arctan \left (\frac {\sqrt {e x +d}\, c}{\sqrt {\left (b e -c d \right ) c}}\right )}{\sqrt {\left (b e -c d \right ) c}\, b}+\frac {2 B \arctan \left (\frac {\sqrt {e x +d}\, c}{\sqrt {\left (b e -c d \right ) c}}\right )}{\sqrt {\left (b e -c d \right ) c}}-\frac {2 A \arctanh \left (\frac {\sqrt {e x +d}}{\sqrt {d}}\right )}{b \sqrt {d}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.92, size = 1130, normalized size = 13.14 \[ -\frac {2\,A\,\mathrm {atanh}\left (\frac {16\,A^3\,c^2\,e^3\,\sqrt {d+e\,x}}{d^{3/2}\,\left (\frac {16\,A^3\,c^2\,e^3}{d}-32\,A^2\,B\,c^2\,e^2+16\,A\,B^2\,b\,c\,e^2\right )}-\frac {32\,A^2\,B\,c^2\,e^2\,\sqrt {d+e\,x}}{\sqrt {d}\,\left (\frac {16\,A^3\,c^2\,e^3}{d}-32\,A^2\,B\,c^2\,e^2+16\,A\,B^2\,b\,c\,e^2\right )}+\frac {16\,A\,B^2\,b\,c\,e^2\,\sqrt {d+e\,x}}{\sqrt {d}\,\left (\frac {16\,A^3\,c^2\,e^3}{d}-32\,A^2\,B\,c^2\,e^2+16\,A\,B^2\,b\,c\,e^2\right )}\right )}{b\,\sqrt {d}}-\frac {\mathrm {atan}\left (\frac {\frac {\left (\sqrt {d+e\,x}\,\left (16\,A^2\,c^3\,e^2-16\,A\,B\,b\,c^2\,e^2+8\,B^2\,b^2\,c\,e^2\right )+\frac {\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\left (8\,B\,b^2\,c^2\,d\,e^2-8\,A\,b^2\,c^2\,e^3+\frac {\left (8\,b^3\,c^2\,e^3-16\,b^2\,c^3\,d\,e^2\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\sqrt {d+e\,x}}{b\,c^2\,d-b^2\,c\,e}\right )}{b\,c^2\,d-b^2\,c\,e}\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,1{}\mathrm {i}}{b\,c^2\,d-b^2\,c\,e}+\frac {\left (\sqrt {d+e\,x}\,\left (16\,A^2\,c^3\,e^2-16\,A\,B\,b\,c^2\,e^2+8\,B^2\,b^2\,c\,e^2\right )+\frac {\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\left (8\,A\,b^2\,c^2\,e^3-8\,B\,b^2\,c^2\,d\,e^2+\frac {\left (8\,b^3\,c^2\,e^3-16\,b^2\,c^3\,d\,e^2\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\sqrt {d+e\,x}}{b\,c^2\,d-b^2\,c\,e}\right )}{b\,c^2\,d-b^2\,c\,e}\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,1{}\mathrm {i}}{b\,c^2\,d-b^2\,c\,e}}{\frac {\left (\sqrt {d+e\,x}\,\left (16\,A^2\,c^3\,e^2-16\,A\,B\,b\,c^2\,e^2+8\,B^2\,b^2\,c\,e^2\right )+\frac {\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\left (8\,B\,b^2\,c^2\,d\,e^2-8\,A\,b^2\,c^2\,e^3+\frac {\left (8\,b^3\,c^2\,e^3-16\,b^2\,c^3\,d\,e^2\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\sqrt {d+e\,x}}{b\,c^2\,d-b^2\,c\,e}\right )}{b\,c^2\,d-b^2\,c\,e}\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}}{b\,c^2\,d-b^2\,c\,e}-\frac {\left (\sqrt {d+e\,x}\,\left (16\,A^2\,c^3\,e^2-16\,A\,B\,b\,c^2\,e^2+8\,B^2\,b^2\,c\,e^2\right )+\frac {\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\left (8\,A\,b^2\,c^2\,e^3-8\,B\,b^2\,c^2\,d\,e^2+\frac {\left (8\,b^3\,c^2\,e^3-16\,b^2\,c^3\,d\,e^2\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,\sqrt {d+e\,x}}{b\,c^2\,d-b^2\,c\,e}\right )}{b\,c^2\,d-b^2\,c\,e}\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}}{b\,c^2\,d-b^2\,c\,e}+16\,A^2\,B\,c^2\,e^2-16\,A\,B^2\,b\,c\,e^2}\right )\,\left (A\,c-B\,b\right )\,\sqrt {-c\,\left (b\,e-c\,d\right )}\,2{}\mathrm {i}}{b\,c^2\,d-b^2\,c\,e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 69.75, size = 87, normalized size = 1.01 \[ \frac {2 A \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{d}} \sqrt {d + e x}} \right )}}{b d \sqrt {- \frac {1}{d}}} - \frac {2 \left (- A c + B b\right ) \operatorname {atan}{\left (\frac {1}{\sqrt {\frac {c}{b e - c d}} \sqrt {d + e x}} \right )}}{b \sqrt {\frac {c}{b e - c d}} \left (b e - c d\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________